package com.zjty.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.zjty.pojo.UserInfo;

@Repository
public interface UserInfoMapper {
	int deleteByPrimaryKey(Long userId);

	int insert(UserInfo record);

	int insertSelective(UserInfo record);

	UserInfo selectByPrimaryKey(Long userId);

	int updateByPrimaryKeySelective(UserInfo record);

	int updateByPrimaryKey(UserInfo record);

	/*
	 * 通过条件查询用户
	 */
	List<UserInfo> selectUser(@Param("pageSize") int pageSize, @Param("pageStart") int pageStart,
			@Param("userName") String userName, @Param("userPhone") String userPhone,
			@Param("userCreatedate") String userCreatedate);

	/*
	 * 通过条件查询用户数量
	 */
	int count(@Param("userName") String userName, @Param("userPhone") String userPhone,
			@Param("userCreatedate") String userCreatedate);

	/*
	 * 检查手机号是否注册
	 */
	UserInfo checkUserByPhone(String userPhone);
}